package com.ic.alarm.service.impl;

import com.ic.alarm.domain.WarnData;
import com.ic.alarm.mapper.WebSocketMapper;
import com.ic.alarm.service.WebSockertService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WebSockertServiceImpl implements WebSockertService {

    @Autowired
    private WebSocketMapper webSocketMapper;

    @Override
    public void instartWarn(WarnData warnData) {
        webSocketMapper.instartWarn(warnData);
    }

    @Override
    public List<WarnData> findLastWarn() {
        return webSocketMapper.findLastWarn();
    }
}
